explain neutral terms and add a simple exercise #1021
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the Untyped chapter, I did not
understand the motivation for neutral terms. The best I
could find through web search was to notice that a neutral term
can be substituted for a variable without creating a β-redex. But
the Untyped chapter does not mention this property.
To address my own concern, I have written something about
alternative ways to define normal forms. And I have conjectured
that you prefer using neutral terms because it requires fewer Agda
constructors to specify normal forms─thereby reducing the number
of cases in relevant proofs. The PR discusses
alternatives and also includes a couple of exercises.
The pull request includes this unanswered question: Why does
the Untyped chapter use syntactic criteria to define normal form,
when the earlier chapters on typed lambda calculi used a semantic
criterion (the term does not reduce)?